package com.hd.sup.modules.vehicle.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hd.sup.core.annotation.DataScope;
import com.hd.sup.modules.poi.model.VehicleAlarmExport;
import com.hd.sup.modules.vehicle.model.VehicleAlarmDailyStatis;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
public interface VehicleAlarmDailyStatisMapper extends BaseMapper<VehicleAlarmDailyStatis> {
    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author chentl
     * @description 车辆维度报警信息分页查询
     * @date 2020/12/30 4:25 下午
     * @params [page, vehicleAlarmDailyStatis]
     */
    @DataScope
    List<Map<String, Object>> getAlarmVehiclePage(@Param("page") Page<Map<String, Object>> page, @Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis vehicleAlarmDailyStatis);

    /**
     * @return java.util.List<com.hd.sup.modules.vehicle.export.VehicleAlarmExport>
     * @author chentl
     * @description 获取导出数据
     * @date 2021/2/23 9:38 上午
     * @params [page, vehicleAlarmDailyStatis]
     */
    List<VehicleAlarmExport> getAlarmVehicleExportData(@Param("page") Page<VehicleAlarmDailyStatis> page, @Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis vehicleAlarmDailyStatis);

    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author chentl
     * @description 获取车辆报警趋势数据
     * @date 2021/2/2 10:27 上午
     * @params [vehicleAlarmDailyStatis, alarmType, deptIds]
     */
    List<Map<String, Object>> getVehicleAlarmTrendData(@Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis vehicleAlarmDailyStatis, @Param("alarmType") String alarmType, @Param("deptIds") List<String> deptIds);

    /**
     * @return java.util.List<com.hd.sup.modules.vehicle.model.VehicleAlarmDailyStatis>
     * @author chentl
     * @description 获取当天统计数据
     * @date 2021/1/11 11:55 上午
     * @params [vehicleAlarmDailyStatis]
     */
    List<VehicleAlarmDailyStatis> getTodayStatisData(@Param("currentDate") String currentDate);

    /**
     * @return void
     * @author chentl
     * @description 根据 enterprise_no，statis_date,alarm_type 更新指定报警统计数据
     * @date 2021/1/11 11:59 上午
     * @params [vehicleAlarmDailyStatis]
     */
    void refreshVehicleAlarmDailyStatis(@Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis vehicleAlarmDailyStatis);

    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author chentl
     * @description 查询企业单车报警比数据
     * @date 2021/2/19 9:03 上午
     * @params [param]
     */
    List<Map<String, Object>> getEnterpriseAlarmRatioTop10(@Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis param);

    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author chentl
     * @description 查询单车报警比数据
     * @date 2021/2/19 10:39 上午
     * @params [param]
     */
    List<Map<String, Object>> getVehicleAlarmRatioTop10(@Param("vehicleAlarmDailyStatis") VehicleAlarmDailyStatis param);
}
